<?
// Class DOT MATRIX EPSON

class dotmatrix {

	function dotmatrix () {
		$this->printer = $printer;
		$this->PackStr = "nvc*";
	}
	
	function SetPackParam($param) {
		$this->PackStr = $param;
	}

	function SetBold ($string) {
		$formated = pack($this->PackStr, 27,69).$string.pack($this->PackStr,27,70);
		return $formated;
	}

	function SetItalic ($string) {
		$formated = pack($this->PackStr, 27,52).$string.pack($this->PackStr,27,53);
		return $formated;
	}
	
	function SetDoubleStrike ($string) {
		$formated = pack($this->PackStr, 27,71).$string.pack($this->PackStr,27,72);
		return $formated;		
	}
	
	function SetSuperScript ($string) {
		$formated = pack($this->PackStr, 27,83,0).$string.pack($this->PackStr,27,84);
		return $formated;		
	}

	function SetSubScript ($string) {
		$formated = pack($this->PackStr, 27,83,1).$string.pack($this->PackStr,27,84);
		return $formated;
	}

	function SetUnderline ($string) {
		$formated = pack($this->PackStr, 27,45,1).$string.pack($this->PackStr,27,45,0);
		return $formated;
	}

	function SetCondensed ($string) {
		$formated = pack($this->PackStr, 27,15).$string.pack($this->PackStr,18);
		return $formated;
	}

	function SetDoubleWidth ($string) {
		$formated = pack($this->PackStr, 27,87,1).$string.pack($this->PackStr,27,87,0);
		return $formated;
	}

	function LoadTemplate ($filename) {
		$fd = fopen ($filename, "r");
		$x=0;
		while (!feof ($fd)) {
		    $buffer[$x] = fgets($fd, 4096);
		    $x++;
		}
		fclose ($fd);
		$this->BufferArray = $buffer;
	}

}
?>